package com.robot.topology.strategy.deterministic;

import com.robot.topology.graph.domain.Edge;
import com.robot.topology.tools.StrategyTools;

public class Incremental extends Deterministic{

	public static final Double IncRatio = (double)0.2;
	public static final Double IncReward = (double) 1;
	public static final Double IncPunish = (double) 0;
	
	public Incremental () {
		this.setRatio(IncRatio);
		this.setReward(IncReward);
		this.setPunishment(IncPunish);
	}
	

	@Override
	public void updateEdgeToReward(Edge edgeTUpdate) {
		edgeTUpdate.setWeight(StrategyTools.incremental(edgeTUpdate.getWeight(),  this.getRatio(), this.getReward()));
	}

	@Override
	public void updateEdgeToPunish(Edge edgeTUpdate) {
		edgeTUpdate.setWeight(StrategyTools.incremental(edgeTUpdate.getWeight(),  this.getRatio(), this.getPunishment()));
	}

}
